using Holoville.HOTween;
using UnityEngine;

public class LevelUpAfterTutorial : MonoBehaviour
{
	private enum FromPosition
	{
		Up = 0,
		Down = 1,
		Right = 2,
		Left = 3
	}

	public UIRect levelUpLabel;

	public UIRect rewardPanel;

	public UIRect blockShotSprite;

	public UIRect levelLabelHolder;

	private void OnEnable()
	{
		HOTween.Init();
		Animation(levelUpLabel, FromPosition.Up);
		Animation(rewardPanel, FromPosition.Right);
		Animation(blockShotSprite, FromPosition.Left);
		Animation(levelLabelHolder, FromPosition.Up);
	}

	private void Animation(UIRect target, FromPosition position)
	{
		target.alpha = 0f;
		Vector3 localPosition = target.transform.localPosition;
		Vector3 localPosition2 = localPosition;
		float num = 150f;
		switch (position)
		{
		case FromPosition.Up:
			localPosition2.y += num;
			break;
		case FromPosition.Down:
			localPosition2.y -= num;
			break;
		case FromPosition.Right:
			localPosition2.x += num;
			break;
		case FromPosition.Left:
			localPosition2.x -= num;
			break;
		}
		target.transform.localPosition = localPosition2;
		HOTween.To(target, 0.8f, new TweenParms().Prop("alpha", 1));
		HOTween.To(target.transform, 0.8f, new TweenParms().Prop("localPosition", localPosition));
	}
}
